import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '课程名',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '课程分类（可添加多个分类，存放json格式）',
    align: "center",
    dataIndex: 'sorts'
  },
  {
    title: '课程封面的地址',
    align: "center",
    dataIndex: 'cover'
  },
  {
    title: '课程简介',
    align: "center",
    dataIndex: 'introduction'
  },
  {
    title: '讲师',
    align: "center",
    dataIndex: 'lecturer'
  },
  {
    title: '负责人（可添加多个负责人，存放json格式）',
    align: "center",
    dataIndex: 'personInCharge'
  },
  {
    title: '课程级别（VIP,免费）',
    align: "center",
    dataIndex: 'level'
  },
  {
    title: '创建者',
    align: "center",
    dataIndex: 'createUser'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '课程名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '课程分类（可添加多个分类，存放json格式）',
    field: 'sorts',
    component: 'InputTextArea',
  },
  {
    label: '课程封面的地址',
    field: 'cover',
    component: 'Input',
  },
  {
    label: '课程简介',
    field: 'introduction',
    component: 'InputTextArea',
  },
  {
    label: '讲师',
    field: 'lecturer',
    component: 'Input',
  },
  {
    label: '负责人（可添加多个负责人，存放json格式）',
    field: 'personInCharge',
    component: 'InputTextArea',
  },
  {
    label: '课程级别（VIP,免费）',
    field: 'level',
    component: 'Input',
  },
  {
    label: '创建者',
    field: 'createUser',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
